function ccrPetHasBuffStacks(buff, stacks)
	return ccrUnitHasBuffStacks("Pet", buff, stacks)
end

function ccrPetAttack(unit)
	if unit == nil then unit = "Target" end;
	isActive = IsPetAttackActive()
	if isActive == true then
		return
	else
		PetAttack(unit)
	end
end

function ccrPetIsAlive()
	isDead = UnitIsDead("Pet")
	if isDead == nil then
		return true
	else
		return false
	end
end

function ccrPetDistanceToTarget(unit)
	if unit == nil then unit = "Target" end;
	if ccrPetIsAlive()
	and Target
	and Target:Exists()
	and not Target:IsDead()
	then
		return Target:GetDistance(Pet)
	else
		return 9999999999999
	end
end

function ccrPetSpec()
	vSpec = GetSpecialization(false, true)
	if vSpec ~= nil then return vSpec end;
end

function ccrPetHealth()
	if ccrPetIsAlive() then
		vHealth = (UnitHealth("Pet") / UnitHealthMax("Pet")) * 100
		if vHealth ~= nil then return vHealth end;
	else
		return 0
	end
end

-- 

function PlayerHasPet()
	if UnitExists("Pet") == 1 then
		return true
	else
		return false
	end
end

function PetIsAlive()
	if UnitIsDead("Pet") == nil
	and PlayerHasPet()
	then
		return true
	else
		return false
	end
end

function PetHealth()
	if PlayerHasPet()
	and PetIsAlive()
	then
		local vHealth = UnitHealth("Pet") / UnitHealthMax("Pet")
		return vHealth
	else
		return 0
	end
end